/**
 * 
 */
package org.gbif.occurrence.search;

import com.opensymphony.xwork2.ActionSupport;

/**
 * @author tim
 */
public class FilterAction extends ActionSupport {
	private static final long serialVersionUID = 5841495754722873060L;

	protected int criteriaType;
	
	@Override
	public String execute() throws Exception {
		return SUCCESS;
	}
	
	/**
	 * Could probably do something a little cleverer here ;o)
	 * E.g. some kind of url rewrite or urlTemplate or something
	 */
	public String criteria() {
		if (criteriaType==0)
			return "0";
		else if (criteriaType==1)
			return "1";
		else if (criteriaType==2)
			return "2";
		else if (criteriaType==3)
			return "3";
		else 
			return "0";
	}

	public int getCriteriaType() {
		return criteriaType;
	}

	public void setCriteriaType(int criteriaType) {
		this.criteriaType = criteriaType;
	}
}
